﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 移库单表
    /// </summary>
    [SugarTable(tableName: "TTransferBinOrders")]
    public partial class TTransferBinOrder
    {
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
        public int Id { get; set; }
        /// <summary>
        /// 移库订单编号：Move+年月+00001(调整作业单)
        /// </summary>
        public string OrderSn { get; set; }
        /// <summary>
        /// 单据类型编号
        /// </summary>
        public int? BillType { get; set; }
        /// <summary>
        /// 单据状态：0-创建;1-提交;2-审核通过;3-作业中；4-已完成;5-强制完成;6-失效；7-异常
        /// </summary>
        public int? Status { get; set; }
        /// <summary>
        /// 来源类型:默认为1(手动建单)，对应中间库的表T_BD_BillSource
        /// </summary>
        public int? SourceType { get; set; }
        /// <summary>
        /// 公司Id
        /// </summary>
        public int? CompanyId { get; set; }
        /// <summary>
        /// 公司名称
        /// </summary>
        public string CompanyName { get; set; }
        /// <summary>
        /// 优先级:默认为0
        /// </summary>
        public int? Proirity { get; set; }
        /// <summary>
        /// 客户单据号
        /// </summary>
        public string Erpcode { get; set; }
        /// <summary>
        /// 调整原因
        /// </summary>
        public string Reason { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 创建人ID
        /// </summary>
        public int? CreateUserId { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateUserName { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime? CreateDate { get; set; }
        /// <summary>
        /// 修改人Id
        /// </summary>
        public int? ModifyUserId { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string ModifyUserName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyDate { get; set; }
        /// <summary>
        /// 提交人Id
        /// </summary>
        public int? SubmitUserId { get; set; }
        /// <summary>
        /// 提交人
        /// </summary>
        public string SubmitUserName { get; set; }
        /// <summary>
        /// 提交时间
        /// </summary>
        public DateTime? SubmitDate { get; set; }
        /// <summary>
        /// 审核人Id
        /// </summary>
        public int? AuditUserId { get; set; }
        /// <summary>
        /// 审核人
        /// </summary>
        public string AuditUserName { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? AuditDate { get; set; }
        /// <summary>
        /// 班次
        /// </summary>
        public string? SchedulingInfo { get; set; }
        /// <summary>
		/// 订单明细
		/// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<TTransferBinOrderDetail> OrderDetailList { get; set; } = null;

        #region 西安煤科院
        /// <summary>
        /// 唯一标识ID
        /// </summary>
        public string OrderId { get; set; }

        /// <summary>
        /// 客户号
        /// </summary>
        public string CustomNo { get; set; }

        /// <summary>
        /// 销售订单编号
        /// </summary>
        public string SalesNo { get; set; }

        /// <summary>
        /// 销售订单行号
        /// </summary>
        public string SalesLine { get; set; }

        /// <summary>
        /// 拣货人
        /// </summary>
        public string AdjustOporate { get; set; }
        #endregion
    }
}
